﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%
    if (ForumContext.Logined)
    {
%>
<div class="navigation">
    <div class="float-right nowrap">
        <a href="<%=ForumContext.GetAbsoluteUrl(ForumUrls.CONTROL_PANEL) %>">Thông tin cá nhân</a>
        <%
            

            if (ForumContext.UserInfo.IsModerator)
            {
        %>
        | <a href="<%=ForumContext.GetAbsoluteUrl(ForumUrls.MODERATORS) %>" title="Moderator">
            Queue</a>
        <%
            }

            if (ForumContext.UserInfo.IsAdmin)
            {%>
        | <a href="<%=ForumContext.GetAbsoluteUrl(ForumUrls.ADMIN)  %>" title="Admin CP">Admin</a>
        <%
            }%>
    </div>
    Xin chào <a class="bold" href="<%=ForumContext.GetAbsoluteUrl(ForumUrls.CONTROL_PANEL) %>">
        <%= Html.Encode(ForumContext.UserInfo.UserName) %></a> ! [ <a href="<%=ForumContext.GetAbsoluteUrl(ForumUrls.LOGOUT) %>"
            title="Logout" onclick="return $.MvcForum.logout()">Logout</a> ]
</div>
<%
    }
    else
    {
%>
<div class="navigation center">
    <%=string.Format(ForumContext.GetGlobalText("WELCOME_GUEST"), ForumContext.GetAbsoluteUrl(ForumUrls.REGISTER), ForumContext.GetAbsoluteUrl(ForumUrls.LOGIN), Server.UrlEncode(Request.RawUrl))%>
</div>
<%
    }
%>
